/********************************************************************************
 *      Copyright:  (C) Guo Zixuan
 *                  All rights reserved.
 *
 *       Filename:  server_sql.h
 *    Description:  This file 
 *
 *        Version:  1.0.0(09/04/25)
 *         Author:  Guo Zixuan <guozixuan@gmail.com>
 *      ChangeLog:  1, Release initial version on "09/04/25 15:16:09"
 *                 
 ********************************************************************************/
#ifndef _SQLITE_H_
#define _SQLITE_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sqlite3.h>
#include "logger.h"

int sqlite_init(sqlite3 **db, const char *db_name);
int sqlite_insert_data(sqlite3 *db, const char *package);
int sqlite_has_data(sqlite3 *db);
int sqlite_read_first_data(sqlite3 *db, char *buf, size_t buflen);
int sqlite_delete_first_data(sqlite3 *db);
int sqlite_close_db(sqlite3 *db);

#endif

